package hibernateUtil;

import org.hibernate.Session;

import db.GenericHibernateDAO;
import db.HibernateUtil;
import MemoryDB.YuanTable;

public class Serverno1Dao extends GenericHibernateDAO<Serverno1,Integer>
{
	public YuanTable GetServerno1ToTable()
	{
		return GetTable("from Serverno1");
	}
	
	public Serverno1 GetServerno1ToTable(int objectiveType)
	{
		return (Serverno1)uniqueResult("from Serverno1 where ObjectiveType=?", objectiveType);
	}
	
	public int  UpdateSql(String mSql)
	{
		return UpdateSql(mSql, HibernateUtil.getDarkSword2SessionFactory().getCurrentSession());
	}
	@Override
	protected Session getSession()
	{
		// TODO Auto-generated method stub
		return HibernateUtil.getDarkSword2SessionFactory().getCurrentSession();
	}
}
